package com.xc.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xc.demo.entity.ProductCategory;
import com.xc.demo.entity.dto.ProductCateChildrenDTO;
import com.xc.demo.mapper.ProductCategoryMapper;
import com.xc.demo.service.ProductCategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMapper, ProductCategory> implements ProductCategoryService {

     @Resource
     private ProductCategoryMapper productCategoryMapper;



    /**
     * 获取一级分类和二级分类的下拉数据
     * @return
     */
    @Override
    public List<ProductCateChildrenDTO> getWithChildren() {
        return productCategoryMapper.getWithChildren();
    }
}
